package org.esjsoftware.v2m.rim.ui;

import net.rim.device.api.system.Display;
import net.rim.device.api.ui.component.ButtonField;

/**
 * 
 * @author Ernest
 * A button which uses the full width of the screen
 */
public final class FullWidthButton extends ButtonField
{
    /**
     * Creates a new FullWidthButton object with provided label text
     * 
     * @param label Label text to display on the button
     */
    public FullWidthButton(String label)
    {
        this(label, ButtonField.CONSUME_CLICK | ButtonField.NEVER_DIRTY);
    }

    /**
     * Creates a new FullWidthButton object with provided label text and style
     * 
     * @param label Label text to display on the button
     * @param label Style for the button
     */
    public FullWidthButton(String label, long style)
    {
        super(label, style);
    }


    /**
     * * @see ButtonField#getPreferredWidth()
     */
    public int getPreferredWidth()
    {
        return Display.getWidth();
    }
}